package com.example.chain.controller;

import com.example.chain.mapper.BlockMapper;
import com.example.chain.domain.entity.Block;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
public class BlockController {
    @Resource
    private BlockMapper blockMapper;

    @GetMapping("/get")
    public List<Block> get(){
        return blockMapper.list();
    }
}
